<style>
    div.sp_result_area.shadowDown{
        width:auto
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-3 col-sm-2"><span style="color: red">*</span>&nbsp;{:__('卖箱日期')}:</label>
        <div class="col-xs-3 col-sm-2">
            <input id="c-selltime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[selltime]" type="text" value="{:$row.selltime?datetime($row.selltime):''}">
        </div>
        <label class="control-label col-xs-3 col-sm-2" ><span style="color: red">*</span>&nbsp;{:__('买箱客户')}:</label>
        <div class="col-xs-3 col-sm-2">
            <input id="c-buy_customer" data-rule="required" class="form-control" name="row[buy_customer]" type="text" value="{$row.buy_customer|htmlentities}" >
        </div>
        <label class="control-label col-xs-3 col-sm-1"><span style="color: red">*</span>&nbsp;{:__('Bin_origin')}:</label>
        <div class="col-xs-3 col-sm-1">
            <select  id="c-bin_origin" data-rule="required" class="form-control selectpicker" name="row[bin_origin]" >
                <option value="1" selected>自备箱</option>
                <!--
                                <option value="2" >租赁箱</option>
                -->
            </select>
        </div>


    </div>

    <div class="form-group">

        <label class="control-label col-xs-6 col-sm-2">&nbsp;{:__('Collect_company_id')}:</label>
        <div class="col-xs-6 col-sm-2">
            <input id="c-collect_company_id"  data-params='{"custom[organ_type]":5}' data-field="organ_name" data-source="organization/index" class="form-control selectpage" name="row[collect_company_id]" type="text" value="{$row.collect_company_id|htmlentities}" placeholder="选填">
        </div>
        <div class="col-xs-6 col-sm-1">
            <a href="{:url('organization/add',['organ_type'=>5])}"  class="btn btn-success btn-dialog" title="添加" ><i class="fa fa-plus"></i> 添加</a>
        </div>
        <label class="control-label col-xs-6 col-sm-1"></label>

        <label class="control-label col-xs-3 col-sm-1">{:__('Bin_type')}:</label>
        <div class="col-xs-3 col-sm-1">
            <input id="c-bin_type"   data-field="name"  data-order-by="weigh desc" data-source="bin.type/index" class="form-control selectpage" name="row[bin_type]" type="text" value="{$row.bin_type|htmlentities}" placeholder="选填">
        </div>
        <label class="control-label col-xs-3 col-sm-1">{:__('Bin_native')}:</label>
        <div class="col-xs-3 col-sm-1">
            <input id="c-bin_native"  data-field="name" data-order-by="weigh desc" data-source="bin.native/index" class="form-control selectpage" name="row[bin_native]" type="text" value="{$row.bin_native|htmlentities}"  placeholder="选填">

        </div>

    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red">*</span>&nbsp;{:__('Take_yard_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-take_yard_id" data-rule="required"
                   data-format-item="<b style='color: #6600ff'>{bin_origin_name}</b>&#45;&#45;&#45;&#45;&#45;&#45;
                   <b style='color: #6600ff'>{bin_native_name}</b>&#45;&#45;&#45;&#45;&#45;&#45;
            <b style='color: #6600ff'>{bin_type_name}</b>&#45;&#45;&#45;&#45;&#45;&#45;可用<b style='color: #6600ff'>{bin_number}</b>个&#45;&#45;&#45;&#45;&#45;&#45;
            {organ_name}"  data-field="organ_name" data-source="organization/bin_type_yard" class="form-control selectpage"
                   name="row[take_yard_id]" type="text" value="{$row.take_yard_id|htmlentities}">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-3 col-sm-2"><span style="color: red">*</span>&nbsp;{:__('Unit_price')}:</label>
        <div class="col-xs-3 col-sm-2">
            <input id="c-unit_price" data-rule="required" class="form-control"  name="row[unit_price]" type="number" value="{$row.unit_price|htmlentities}">
        </div>
        <label class="control-label col-xs-3 col-sm-1"><span style="color: red">*</span>&nbsp;{:__('Salesman_id')}:</label>
        <div class="col-xs-3 col-sm-1">
            <input id="c-salesman_id" data-rule="required" data-field="nickname"  data-source="auth.admin/index" class="form-control selectpage" name="row[salesman_id]" type="text" value="{$row.salesman_id|htmlentities}">
        </div>

        <label class="control-label col-xs-3 col-sm-1"><span style="color: red">*</span>&nbsp;{:__('Currency_type')}:</label>
        <div class="col-xs-3 col-sm-1">
            <select  id="c-currency_type" data-rule="required" class="form-control selectpicker" name="row[currency_type]" >
                <option ></option>
                {foreach name="currencyTypeList" item="vo"}
                <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
        <label class="control-label col-xs-3 col-sm-1" >{:__('Take_number')}:</label>
        <div class="col-xs-3 col-sm-1">
            <input id="c-take_number"  class="form-control" name="row[take_number]" type="text" value="{$row.take_number|htmlentities}">
        </div>
    </div>


    <div class="form-group purchase_number">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red">*</span>&nbsp;{:__('卖箱数量')}:</label>
        <div class="col-xs-6 col-sm-2">
            <input id="c-sell_number" data-rule="required" class="form-control" name="row[sell_number]" type="number"   value="{$row.sell_number|htmlentities}">
        </div>
    </div>




    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
